<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="org.jeecgframework.web.util.StaticValue" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@include file="/context/mytags.jsp" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>服务单展开</title>
    <t:base type="jquery,easyui,tools,DatePicker"></t:base>
    <link rel="stylesheet" href="plug-in/uploadify/css/uploadify.css" type="text/css"/>
    <script type="text/javascript" src="plug-in/ckfinder/ckfinder.js"></script>
    <script type="text/javascript" src="plug-in/uploadify/jquery.uploadify-3.1.min.js"></script>
    <%--<script src = "webpage/com/zybk/cbsservice/cbsService-add.js"></script>--%>
    <style type="text/css">
        .noSelect {
            border: 0;
            /*display: block;*/
            /*position: relative;*/
            min-height: 1.146667rem;
            line-height: 1.146667rem;
            white-space: nowrap;
            /*width: 100%;*/
            overflow: hidden;
            padding-right: .6rem;
            background-color: #eee;
            background: transparent;
            color: #000000;
            appearance: none;
            -moz-appearance: none; /* Firefox */
            -webkit-appearance: none; /* Safari 和 Chrome */
        }
    </style>
</head>
<body>

<table class="ftable" id="" border="1">
    <tbody>
    <c:if test="${not empty cbsServiceList || type eq '1'}">
        <tr>
            <th>服务单号</th>
            <th>服务类型</th>
            <th>故障分类</th>
            <th>服务状态</th>
            <th>服务商</th>
            <th>服务商处理进度</th>
            <th>创建时间</th>
            <th>关单时间</th>
        </tr>
        <c:forEach items="${cbsServiceList}" var="cbs" varStatus="b">
            <tr>
                <td><a href="#" style="color:blue;text-decoration:underline;"
                       onclick="cbsServiceDetials('${cbs.id}','${cbs.code}')">${cbs.code}</a></td>
                <td>
                    <c:if test="${not empty cbs.t1name}">${cbs.t1name}>>${cbs.t2name}</c:if>
                </td>
                <td>
                    <c:if test="${not empty cbs.e1name}">${cbs.e1name}>>${cbs.e2name}</c:if>
                </td>
                <td>${cbs.sta}</td>
                <td>${cbs.shortname}</td>
                <td>${cbs.speed}</td>
                <td>${cbs.create_date}</td>
                <td>${cbs.close_time}</td>
            </tr>
        </c:forEach>
    </c:if>

    <c:if test="${not empty cbsServiceList1 || type eq '2'}">
        <tr>
            <th>服务单号</th>
            <th>设备SN</th>
            <th>服务类型</th>
            <th>服务状态</th>
            <th>服务商</th>
            <th>服务商处理进度</th>
            <th>创建时间</th>
            <th>关单时间</th>
        </tr>
        <c:forEach items="${cbsServiceList1}" var="cb" varStatus="a">
            <tr>
                <td><a href="#" style="color:blue;text-decoration:underline;"
                       onclick="cbsServiceDetials('${cb['id']}','${cb['code']}')">${cb['code']}</a></td>
                <td>${cb['sn']}</td>
                <td>
                    <c:if test="${not empty cb.t1name}">${cb.t1name}>>${cb.t2name}</c:if>
                </td>
                <td>${cb['sta']}</td>
                <td>${cb['shortname']}</td>
                <td>${cb['speed']}</td>
                <td>${cb['create_date']}</td>
                <td>${cb['close_time']}</td>
            </tr>
        </c:forEach>
    </c:if>

    <c:if test="${not empty zyInspectionPlanList || type eq '3'}">
        <tr>
            <th>服务单号</th>
            <th>状态</th>
            <th>计划巡检月份</th>
            <th>预约上门时间</th>
            <th>服务商</th>
            <th>工程师</th>
            <th>实际巡检时间</th>
        </tr>
        <c:forEach items="${zyInspectionPlanList}" var="plan" varStatus="c">
            <tr>
                <td><a href="#" style="color:blue;text-decoration:underline;"
                       onclick="planDetials('${plan['id']}','${plan['planIds']}')">${plan['planIds']}</a></td>
                <td>${plan['state']}</td>
                <td>${plan['dates']}</td>
                <td>${plan['time']}</td>
                <td>${plan['shortname']}</td>
                <td>${plan['eName']}</td>
                <td>${plan['beginTime']}</td>
            </tr>
        </c:forEach>
    </c:if>
    <c:if test="${not empty cbsServiceEntityList || type eq '4'}">
        <tr>
            <th>服务单号</th>
            <th>服务类型</th>
            <th>故障分类</th>
            <th>服务状态</th>
            <th>服务商</th>
            <th>服务商处理进度</th>
            <th>创建时间</th>
        </tr>
        <c:forEach items="${cbsServiceEntityList}" var="cbs" varStatus="a">
            <tr>
                <td><a href="#" style="color:blue;text-decoration:underline;" onclick="cbsServiceDetials('${cbs.id}','${cbs.code}')">${cbs.code}</a></td>
                <td>
                    <c:if test="${not empty cbs.serviceType1}">
                        ${cbs.serviceType1.name}》${cbs.serviceType2.name}
                    </c:if>
                </td>
                <td>
                    <c:if test="${not empty cbs.errorType1}">
                        ${cbs.errorType1.name}》${cbs.errorType2.name}
                    </c:if>
                </td>
                <td>
                    <t:dictSelect clazz="noSelect" hasPleaseSelect="false" readonly="readonly" field="status"
                                  id="status_${a.index}" type="select" defaultVal="${cbs.status}"
                                  typeGroupCode="<%=StaticValue.Source_State %>"/>
                </td>
                <td></td>
                <td>
                    <t:dictSelect clazz="noSelect" hasPleaseSelect="false" readonly="readonly" field="speedStatus"
                                  id="speedStatus_${a.index}" type="select" defaultVal="${cbs.speedStatus}"
                                  typeGroupCode="<%=StaticValue.Third_Party_Processing_Progress %>"/>
                </td>
                <td><fmt:formatDate value='${cbs.createDate}' type="date" pattern="yyyy-MM-dd"/></td> <%--hh:mm:ss--%>
            </tr>
        </c:forEach>
    </c:if>
    <c:if test="${not empty cbsHandleLogEntityList || type eq '5'}">
        <tr id="cbsLog">
            <th>业务责任人</th>
            <th>时间</th>
            <th>处理描述</th>
            <th>附件</th>
        </tr>
        <c:forEach items="${cbsHandleLogEntityList}" var="cbsHandleLog">
            <tr class="cbsHandleLog">
                <td>${cbsHandleLog.createName}</td>
                <td>${fn:substring(cbsHandleLog.createDate,0,19)}</td>
                <td>${cbsHandleLog.description}</td>
                <td>
                    <span class="color-blue"><a class="color-blue" href="fileUploadController.do?downLoadFile&fileLogId=${cbsHandleLog.zyFileLogId.id}">${cbsHandleLog.zyFileLogId.oldFileName}</a></span>
                </td>
            </tr>
        </c:forEach>
    </c:if>
    </tbody>
</table>
</body>
<script type="text/javascript">
    function planDetials(id,code) {
        addOneTab("巡检计划详情"+code, "zyInspectionPlanController.do?detailsOfEngineerPlan&id=" + id);
        frameElement.api.close();
    }

    function cbsServiceDetials(id,code) {
        addOneTab("服务单详情"+code, "cbsServiceController.do?detail&id=" + id +"&code="+code,"");
        frameElement.api.close();
    }

</script>
</html>
